//
//  StoreKitContext.h
//  Stock
//
//  Created by sun black on 11-11-29.
//  Copyright (c) 2011年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <StoreKit/StoreKit.h>
#import "BaseService.h"
#import "NSData+Base64.h"

#define kQueryProducts  @"queryProducts"
#define kPurchaseProduct @"purchaseProduct"
#define kVerifyReceipt  @"verifyReceipt"

@interface StoreKitContext : BaseService<SKProductsRequestDelegate,SKPaymentTransactionObserver,ASIHTTPRequestDelegate>

-(void)queryProducts;

-(void)purchaseProduct:(NSString *)productId;

-(void)tellServerPurchaseSuccess:(NSString *)productId receipt:(NSData *)receipt isNew:(BOOL)isNew;
-(void)verifyReceipt:(NSData *)receipt;


+(StoreKitContext *)shareInstance;

@end
